package org.sky.algorithm.linear;

/**
 * 双向循环列表测试类
 *
 * @author fog
 * @date 2021/9/5
 */

public class DoubleNodeTest {

    public static void main(String[] args) {

        DoubleNode n1=new DoubleNode(1);
        DoubleNode n2= new DoubleNode(2);
        DoubleNode n3= new DoubleNode(3);

        n1.addNode(n2);
        n2.addNode(n3);

        System.out.println(n2.pre().getData());
        System.out.println(n2.getData());
        System.out.println(n2.next().getData());
        System.out.println(n3.next().getData());
        System.out.println(n1.pre().getData());

    }

}
